<form class="layui-form seller-form">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">时间区间：</label>
            <div class="layui-input-inline seller-inline-4">
                <input type="text" name="datetime" class="layui-input" id="test6">
            </div>
        </div>
        <div class="layui-inline">
            <div class="layui-input-block">
                <button class="layui-btn layui-btn-sm" lay-submit lay-filter="d"><i class="iconfont icon-chaxun"></i>筛选</button>
            </div>
        </div>
    </div>
</form>
<table id="moneyLog" lay-filter="moneyLog"></table>
<script>
    var table;
    layui.use(['form', 'layedit', 'laydate','table'], function(){
        table = layui.table.render({
            elem: '#moneyLog',
            cellMinWidth: '80',
            page: 'true',
            limit:'10',
            url: "{:url('User/moneyLog')}?_ajax=1&user_id={$user_id}&flag=true",
            id:'moneyLog',
            height: '472',
            cols: [[
                {type:'numbers'},
                {field:'type', width:95, title:'类型'},
                {field:'money', width:110, title:'金额'},
                {field:'balance', width:150, title:'余额'},
                {field:'memo', title: '备注'},
                {field:'ctime', width:165, title:'时间'}
            ]]
        });

        layui.laydate.render({
            elem: '#test6',
            range: true
        });

        layui.form.on('submit(d)', function(data){
            console.log(data);
            layui.table.reload('moneyLog', {
                where: data.field
                ,page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    });
</script>